StopWatch is a utility written using Think C, free for non-commercial use. Its main purpose is to make it easier to time and compare applications, procedures and programs, but it can also be used as an event-logger and a tool for dinosaur egg thieves. Under System 6, it is primarily intended for use with MultiFinder, though this is not mandatory.
********* Main Features **********
The main features are
1) It will count up or down from a specified time (between 0 and 99 hours);
2) It can count in 1/100 th of seconds;
3) You can set a pause period for the timer to wait before starting the main count, to give you time to switch over to your other application;
4) You can save the times at which events occur to a text file (see "Holding times" below);
5) If your system is AppleEvent aware, StopWatch can send and receive certain AppleEvents (see "Messages" below);
6) There are some other useful features built in---see "Other features" below;
7) Shortcuts:
RETURN key starts and stops the timer if StopWatch is the active window;
ENTER key has same effect as cmd-H ("Holds" a time in log window);
TAB key selects Log window if it is visible and inactive.
*********** Holding Times *********
If you hit cmd-H or choose "Hold" from the File menu, or press the Enter key, the current time will be "held". When you do this, the time appears in a separate window followed by the phrase "Event # n" if this is the n-th time you have saved a time, which you can then edit for a more informative description. The times at which events are held can also be timestamped, and the fields are separated by tabs, hence are easily pasted into spreadsheets. The saved times window can also be printed.
********** Messages *********
If your system is AppleEvent aware, StopWatch can send and receive certain messages, and do this by two different methods:
a) Using high-level messages: You can program StopWatch to send a high level event at the start of a count up or the end of a count down to the (running) application of your choice by specifying the event and the signature of the application in the appropriate field after selecting "Messages" from the "Timer" menu. For example, you could get StopWatch to reset itself at the end of a countdown by telling it to send the message 'RSET' to the application 'eNpB' at the end of the countdown.
StopWatch also receives high-level events (as indicated in the above example). The events which it receives are:
'GHOW' Starts the timer.
'HOLD' Holds a time.
'UNDO' Undoes the last operation; (hold or text editing).
'STOP' Stops the timer.
'RSET' Resets the timer.
'SAVE' Saves the held times to a text file entitled "Saved times";
(creates a new file if "Saved times" already exists).
'QUIT' Quits the application, saving any held times.
The high-level events are probably most useful for programmers.
b) Using AppleEvents: You can program StopWatch to launch an application at the start of a count up or end of a count down. The principal purpose of this is to enable the watch to run AppleScripts: you have a script that you want to run after a specified period, so you save the script as an applet (i.e., a run-only application version of your script with no startup dialog). You then select this applet using the appropriate "Choose" button in the "Messages" dialog, and at the end of the count down, the applet will be launched and your script will be run. [This is particularly useful if you want to steal some dinosaur eggs and need to shut down a security system after, say, 50 seconds or so.]
StopWatch will also react to AppleEvents sent to it: for example
tell application "stopwatch"
go
end tell
will start the timer (launching the program if necessary). Other messages to which it responds are hold, undo,stop, reset, save, and quit, each of which does the obvious thing. The "hold" instruction will also take an optional string as argument, so for example, the script
tell application "stopwatch"
hold "This is a test."
end tell
will insert the string "This is a test." in place of "Event #n".]
Currently, StopWatch does not return any value in response to any of these events.
*********** Other Features *********
1. You can grey the clock face out to reduce interference with the application being timed by selecting "Grey running clock" from the "Timer" menu.
2. You can reduce the size of the clock-face somewhat by clicking in the Zoom box.
3. You can prevent your computer from going to sleep when the program is running by choosing "Disable Idle" from the "Timer" menu, if your system has this capability (e.g. PowerBooks).
4. You can choose the creator for your Saved Times file by choosing "Log file creator..." from the "Log" menu.
5. There is a small on-line Help file available under the Apple menu.
6. Renaming the program will change the title bar, which is useful if you want more than one copy of the program running at once.
********* Accuracy **********
If you are using system software earlier than 6.0.3, the timing mechanism uses the Toolbox function TickCount() which counts close to 60 every second. Because of this, and because TickCount() is itself not completely accurate, in this case StopWatch can only be regarded as accurate to plus or minus 1/50th of a second at best.
If you are using system software between 6.0.3 and 6.0.8 the program makes use of the Time Manager, and is somewhat more accurate. If you are using sofware which has the extended Time Manager (System 7 and above), the program will make use of that and is again more accurate. This is supposed to be capable of millisecond accuracy and indeed, it is, provided you don't want to time events of the order of a day accurate to the nearest millisecond. I have found that on my (accellerated) Mac IIci running System 7.0.1, the clock gained about .35 seconds over the course of 24 hours. I expect that there will be similar variations for other machines, but these will depend on the machine and timing chip itself, plus local conditions such as temperature. Therefore, if you are going to be using the watch to time something very accurately over a period of some length, be sure to calibrate your system properly first.
*********** Warnings *********
1. I have tested the application on an SE/30 running System 7.0.1 and on a IIci running the same system and System 6.0.8, and on a PowerMac 7300/200 running system 7.5.5. I have not tested the application under other systems or on other machines, but it should work with any system software from 4.2 onwards at least.
2. Using AppleEvents to start and stop the clock will probably introduce some inaccuracies, since it takes some time for the messages to get through from one application to the other---the delay will depend on your system. (You can test this by e.g., sending the message STOP to the application eNpB at the start of a countup; on my Mac IIci, the counter stops at 0.02 seconds, and on the SE/30 at 0.06 seconds.)
3. If you run a screen saver like After Dark or Pyro! and you also run TrueType, then you should arrange that TrueType loads before the screen saver. This can be achieved with an init manager, or more simply by renaming one or other init so that the (renamed) TrueType alphabetically precedes the (renamed) screen saver. If you do not do this, the clock will "shine through" when the screen saver becomes active, a problem which will also occur with Apple's Alarm Clock desk accessory. Greying the clock out when it is running is another cure for the problem. (This problem only occcurs when using System 6.0.7; TrueType is automatically loaded first with System 7.)
4. Use the program at your own risk: I am not responsible for any damage to your soft- or hardware resulting from any crashes caused by StopWatch.
********* Version History *********
1.4.0->1.4.1 Bug fix version.
1.3.2->1.4.0: Improved timing (uses (extended) Time Manager if available.)